<template>

<div>
    <button v-for="btn in btnList" :class="{ bg:btn2==btn}" :key="btn" @click="handleClick($event,btn)">{{btn}}</button>
</div>

</template>

<script>
export default {

    props: {
        btn2: String
    },
    data() {
        return {
            btnList: ['all', 'finish', 'unfinish']
        }
    },
    methods: {

        handleClick(event, btn2) {
            this.$emit('handleChange', btn2)
        }

    }
}
</script>

<style>
.bg{
    background-color:aqua
}
</style>
